package com.bhs.controller;



import com.bhs.pojo.Order;
import com.bhs.service.OrderService;
import com.bhs.vo.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @PostMapping("/getOrder/{username}")
    public ResponseData getOrderDataById(@PathVariable("username") String username){
        List<Order> order =  orderService.getOrderDataById(username);
        return ResponseData.success(order);
    }
}
